//
//  SEOBox_AppDelegate.h
//  SEOBox
//
//  Created by Syd on 10-2-28.
//  Copyright MusicPeace.ORG 2010 . All rights reserved.
//

#import <Cocoa/Cocoa.h>
@class ProjectsCollectionView;
@class ProjectsArrayController;
@class AddProjectController;
@class EditProjectController;
@class Project;

@interface SEOBox_AppDelegate : NSObject <NSApplicationDelegate, NSCollectionViewDelegate>
{
    NSWindow *window;
    
    NSPersistentStoreCoordinator *persistentStoreCoordinator;
    NSManagedObjectModel *managedObjectModel;
    NSManagedObjectContext *managedObjectContext;
    
    IBOutlet ProjectsArrayController *projectsArrayController;
    
    IBOutlet ProjectsCollectionView *projectsCollectionView;
    
    AddProjectController *addProjectController;
    EditProjectController *editProjectController;
}

@property (nonatomic, retain) IBOutlet NSWindow *window;

@property (nonatomic, retain, readonly) NSPersistentStoreCoordinator *persistentStoreCoordinator;
@property (nonatomic, retain, readonly) NSManagedObjectModel *managedObjectModel;
@property (nonatomic, retain, readonly) NSManagedObjectContext *managedObjectContext;

@property (nonatomic, retain) ProjectsArrayController *projectsArrayController;

@property (nonatomic, retain) ProjectsCollectionView *projectsCollectionView;

@property (nonatomic, retain) AddProjectController *addProjectController;
@property (nonatomic, retain) EditProjectController *editProjectController;

- (IBAction)saveAction:sender;
- (IBAction)showAddProjectPanel:(id)sender;
- (IBAction)addProject:(id)sender;
- (IBAction)resizeProjectItemView:(id)sender;
- (IBAction)showEditProjectPanel:(id)sender;
- (IBAction)editProject:(id)sender;
- (IBAction)deleteProject:(id)sender;
- (IBAction)showProjectWindow:(id)sender;
- (void)doubleClick:(id)sender;
- (BOOL)isOpenedProject:(Project *)aProject;
@end
